import React, { Component } from 'react'
//合成事件
export class Demo4 extends Component {
  hande1(){
    console.log(this);
    
  }
  hande2(x,y,ev){
    console.log(this);
    console.log(x,y);
    console.log(ev);
  }
  handle3=(x,y,ev)=>{
    console.log(this);
    console.log(x,y);
    console.log(ev);
    
    
    
  }


  render() {
    return (
      <div>
        <button onClick={this.hande1}>事件绑定测试1</button> 
        <button onClick={this.hande2.bind(this,10,20)}>事件绑定测试2</button> 
        <button onClick={this.handle3}>事件绑定测试3</button> 
        <button onClick={this.handle3.bind(null,10,20)}>事件绑定测试4</button> 
    
      </div>
    )
  }
}

export default Demo4